function cssStyle2DomStyle(sName) {
  let ToString = (s) => {
    return s.toLocaleUpperCase();
  };
  let arr = sName.split("-");
  if (arr[0] === "") arr.splice(0, 1);
  for (let i = 1; i < arr.length; i++) {
    arr[i] = arr[i].replace(arr[i][0], ToString(arr[i][0]));
  }
  return arr.join("");
}

console.log(cssStyle2DomStyle("-webkit-background-composite"));
